var prefix = ctx + "msg/result";
$(function() {
    var options = {
        url: prefix + "/page",
        updateUrl: prefix + "/goEditPage",
        removeUrl: prefix + "/{id}",
        exportUrl: prefix + "/export",
        modalName: "消息发送结果",
        columns: [{
            checkbox: true
        },
        {
            field: 'resultId', 
            title: '主键',
            visible: false
        },
        {
            field: 'msgId', 
            title: '主键'
        },
        {
            field: 'resultCode', 
            title: '消息发送结果编码，0成功，1失败'
        },
        {
            field: 'resultMsg', 
            title: '消息发送结果信息'
        },
        {
            field: 'msgChannel', 
            title: '消息发送渠道'
        },
        {
            field: 'delFlag', 
            title: '删除标识（0-正常,1-删除）'
        },
        {
            field: 'createBy', 
            title: '创建人ID'
        },
        {
            field: 'createTime', 
            title: '创建时间'
        },
        {
            field: 'updateBy', 
            title: '更新人ID'
        },
        {
            field: 'updateTime', 
            title: '更新时间'
        },
        {
            title: '操作',
            align: 'center',
            formatter: function(value, row, index) {
                var actions = [];
                actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.resultId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                actions.push('<a class="btn btn-danger btn-xs ' + deleteFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.resultId + '\')"><i class="fa fa-remove"></i>删除</a>');
                return actions.join('');
            }
        }]
    };
    $.table.init(options);
});
